package com.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project.entity.po.Flow;
import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;import java.util.List;

@Mapper
public interface FlowMapper extends BaseMapper<Flow> {
    /**
     * 查询所有流水信息
     *
     * @return
     */
    List<Flow> selectAllFlow();

    /**
     * 根据菜名进行模糊查询
     *
     * @param name
     * @return
     */
    List<Flow> selectFlowByName(@Param("dishName") String name);

    /**
     * 根据ID删除流水信息
     *
     * @return
     */
    int updateFlowById(@Param("flowId") Long id);

    /**
     * 根据id查询流水信息
     *
     * @param id
     * @return
     */
    Flow selectFlowById(@Param("flowId") Long id);

    /**
     * 添加流水信息
     *
     * @param flow
     * @return
     */
    int insertFlow(Flow flow);

    /**
     * 修改流水信息
     *
     * @param flow
     * @return
     */
    int updateFlow(Flow flow);
}